/**
 * \file CBLsNonFactureFrm.h
 * \author Corentin Le Bail
 * \date 2009-2012
 * \brief Fichier de déclaration de la class CBLsNonFactureFrm
 */
//------------------------------------------------------------------------------
#ifndef __CBLSNONFACTUREFRM_H__
#define __CBLSNONFACTUREFRM_H__
//------------------------------------------------------------------------------
#include <QDialog>
#include <QList>
#include <QDate>
#include "ui_CBLsNonFactureFrm.h"
//------------------------------------------------------------------------------
/**
 * \class CBLsNonFactureFrm CBLsNonFactureFrm.h "CBLsNonFactureFrm.h"
 * \brief Classe de la fenêtre des bl non facturés.
 */
class CBLsNonFactureFrm : public QDialog, private Ui::BLsNonFactureFrm
{
	Q_OBJECT
	public:
		/**
		 * \fn CBLsNonFactureFrm(QWidget *parent = 0)
		 * \brief Constructeur
		 * \param[in] parent Référence vers un objet parent
		 */
		CBLsNonFactureFrm(QWidget *parent = 0);
		/**
		 * \fn QList<int> getBLsAFacturer(void)
		 * \return La liste des bl à facturer
		 */
		QList<int> getBLsAFacturer(void) { return listBLsSelected; }
		/**
		 * \fn QDate getDateFacture(void)
		 * \return La date de facturation
		 */
		QDate getDateFacture(void) { return dateEdit->date(); }
	private:
		enum {cnbnfCode, cnbnfDocument, cnbnfDate, cnbnfCodeClient, cnbnfNomClient, cnbnfMontant, cnbnfPretAFacture} EColBLsNonFactureNames;
		
		QList<int> listBLsSelected;
		
		void createGrille(void);
		void loadGrille(void);
		void reject(void);
	private slots:
		void on_tableBLsNonFacture_cellDoubleClicked(int row, int column);
		void on_tableBLsNonFacture_beforeInsert(const QSqlQuery *query, CMyTableWidgetItem *item);
		void on_cmdFactureBLsSelected_clicked(bool checked=false);
		void on_cmdSelectBLMois_clicked(bool checked=false);
};
//------------------------------------------------------------------------------
#endif //__CBLSNONFACTUREFRM_H__
//------------------------------------------------------------------------------
